# Maintainer: Jaroslav Lichtblau <svetlemodry@archlinux.org>
# Contributor: Daniel Wallace < danielwallace at gtmanfred dot com>
# Contributor: Mitch Bigelow <ipha00@gmail.com>
# Contributor: Patrick Palka <patrick@parcs.ath.cx>

pkgname=pianobar
pkgver=2022.04.01
pkgrel=2
pkgdesc="Console-based frontend for Pandora"
arch=('loong64' 'x86_64')
url="https://6xq.net/pianobar/"
license=('MIT')
depends=('libao' 'ffmpeg' 'curl' 'json-c')
source=(https://6xq.net/pianobar/$pkgname-$pkgver.tar.bz2{,.asc})
validpgpkeys=('017D74E27F5856963801781DF663943E08D8092A') # Lars-Dominik Braun <lars@6xq.net>
sha256sums=('1670b28865a8b82a57bb6dfea7f16e2fa4145d2f354910bb17380b32c9b94763'
            'SKIP')

build() {
  make -C ${pkgname}-${pkgver}
}

package() {
  make -C ${pkgname}-${pkgver} DESTDIR="${pkgdir}" PREFIX=/usr install
  install -Dm644 $pkgname-"${pkgver}"/COPYING "${pkgdir}"/usr/share/licenses/$pkgname/LICENSE
  install -Dm755 $pkgname-"${pkgver}"/contrib/headless_pianobar "${pkgdir}"/usr/bin/pianoctl
}
